package json;

import com.google.gson.Gson;

/**
 * @Author zhangtao
 * @create 2021/12/24 15:51
 */
public class Test {
    public static void main(String[] args) {
        String json = "{\"name\":\"ddd\",\"hobby\":{\"name\":\"ball\",},}";

        //gson
        User u = new Gson().fromJson(json, User.class);
        System.out.println(u.toString());
    }
}
